package com.wy.framework.actions.user;

import org.springframework.beans.factory.annotation.Autowired;

import com.opensymphony.xwork2.Action;
import com.wy.framework.constants.FieldConstant;
import com.wy.framework.exceptions.ServiceException;
import com.wy.framework.actions.AbstractBaseAction;
import com.wy.framework.pojos.TSysUserinfo;
import com.wy.framework.services.user.UserManageService;

/**
 * 项目名称：openportal
 * 类名称：ChangePwdAction
 * 类描述：修改密码控制器
 * 创建人：张旭星
 * 创建时间：2015-12-28 下午8:05:43
 * 修改人：张旭星
 * 修改时间：2015-12-28 下午8:05:43
 * 版本信息：@version 1.0
 * Copyright (c) 2015万雍科技（上海）有限公司-版权所有  
 * 修改备注：
 * @version 
 */
public class ChangePwdAction extends AbstractBaseAction {

    @Autowired
    private UserManageService userManageService;

    private String newPassword;

    @Override
	public String execute() throws ServiceException {
		rspCode = userManageService.updatePwd(newPassword);
		if("000000".equals(rspCode)){
			return "success";
		}
		return "fail";
    }


    public void setNewPassword(String newPassword) {
	this.newPassword = newPassword;
    }
}
